import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import db from '@/utils/localstorage';

interface CourseState {
  loading: boolean
}

export const CourseSlice = createSlice({
  name: 'course',

  initialState: <CourseState>{
    loading: false
  },

  reducers: {
    setLoading(state: CourseState, action: PayloadAction<boolean>) {
      state.loading = action.payload
    }
  },
})

export default CourseSlice.reducer
